<if condition="$cat_level == 1">
  <div class="uu_cat_bg"></div>
  
	
  <div class="uu_cat J_sel">
  		<ytata:cat listname="category" type="$type" pid="0"/>
	    <volist name="category.list" id="cat">
		<div class="li" category1="{$cat.c_id}"  category2="0" ids="{$cat.c_id},0" cn="{$cat.c_title}">{$cat.c_title}</div>
	</volist>
  </div>

  <else />
  
  
  <!--二级分类 -->
  <div class="uu_cat_bg"></div>
  <div class="uu_cat2 ">
 
  
  <ytata:cat listname="category" type="$type" pid="0"/>
  <volist name="category.list" id="li">
  <div class="cats J_sel">
  <div class="ct">{$li.c_title}</div>
  
 			<ytata:cat listname="lis" type="$type" pid="$li['c_id']"/>
			<volist name="lis.list" id="lis">
			<div class="li font10" category1="{$lis.c_pid}"  category2="{$lis.c_id}" ids="{$lis.c_pid},{$lis.c_id}" cn="{$lis.c_title}">{$lis.c_title}</div>
			</volist>
  
  
  </div>
</volist>

</div>


</if>



 
<script>
lock_touchmove();
$(".uu_cat_bg").click(function () {
        $(".uu_cat_bg,.uu_cat,.uu_cat2").remove();
		lock_touchmove();
});

var ids="{$selectids}";
$('[ids="'+ids+'"]').addClass('select');

$(".J_sel>.li").click(function () {
		$('input[name=category1]').val($(this).attr('category1'));
		$('input[name=category2]').val($(this).attr('category2'));
		$('.J_cat_cn').html($(this).attr('cn'));
        $(".uu_cat_bg,.uu_cat,.uu_cat2").remove();
		un_lock_touchmove();
		
});
</script>
 